<!--
 * @Description: 通用loading
 * @Author: wws1993
 * @Date: 2020-12-01 15:47:30
 * @LastEditTime: 2020-12-01 17:04:45
 * @LastEditors: wws1993
 * @FilePath: \todoManager\src\components\Base\Loading.vue
-->

<template>
  <div class="base-loading" v-show="visible">
    <img :src="img.loading" alt="loading">
  </div>
</template>

<script lang="ts">
import Vue from 'vue';
import img from '@/lib/img';
import { Prop, Component } from 'vue-property-decorator';

@Component({})
export default class Loading extends Vue {
  @Prop() private visible!: boolean;

  private img: any = img;
}
</script>

<style lang="scss" scoped>
.base-loading{
  position:absolute; top:0; left:0; right:0; bottom:0; background:rgba(255,255,255,.7);
  img{position:absolute; top:50%; left:50%; margin-top:-50px; margin-left:-25px}
}
</style>